home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / wmv12s.zip / ERROR.C < prev    next >
Text File  |  1993-01-04  |  1KB  |  27 lines

  1. /* handle internal errors */
  2.  
  3.  
  4. /* global variable */
  5. int brk_st;  /* orginal break status */
  6.  
  7. error(where,panic)
  8. char *where;  /* call from what procedure */
  9. int panic;  /* should I tell the user to panic? 0=no 1=yes */
  10. {
  11.   putn("MV stopped due to internal error in '", where, "'\n\015", 0);
  12.   if (panic) {    /* this should never happen */
  13.     putn("Because of this error, your disk directory might be in an\n\015",
  14.      "inconsistent state. Please run chkdsk on your disk to see\n\015",
  15.      "if this is so. Sorry.\n\015", 0);
  16.   } else {  /* not to panic */
  17.     putn("Do not worry, your disk is not screwed up, only that the\n\015",
  18.      "operation you requested was not completed.\n\015", 0);
  19.   }
  20.   putn("Please report this error to the author of this program. You can\n\015",
  21.        "obtain his email address by typing 'mv' with no parameters.\n\015", 0);
  22.  
  23.   /* now restore break status to whatever the user set it to */
  24.   bset(brk_st);
  25.   exit(2);  /* indicate internal error */
  26. }
  27.